\(\int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx\) [44]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 162 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-8 i a^4 x-\frac {8 i a^4 \cot (c+d x)}{d}-\frac {4 a^4 \cot ^2(c+d x)}{d}+\frac {8 i a^4 \cot ^3(c+d x)}{3 d}+\frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {8 a^4 \log (\sin (c+d x))}{d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d} \]

[Out]

-8*I*a^4*x-8*I*a^4*cot(d*x+c)/d-4*a^4*cot(d*x+c)^2/d+8/3*I*a^4*cot(d*x+c)^3/d+67/60*a^4*cot(d*x+c)^4/d-8*a^4*l
n(sin(d*x+c))/d-1/6*cot(d*x+c)^6*(a^2+I*a^2*tan(d*x+c))^2/d-7/15*I*cot(d*x+c)^5*(a^4+I*a^4*tan(d*x+c))/d

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3634, 3674, 3672, 3610, 3612, 3556} \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {67 a^4 \cot ^4(c+d x)}{60 d}+\frac {8 i a^4 \cot ^3(c+d x)}{3 d}-\frac {4 a^4 \cot ^2(c+d x)}{d}-\frac {8 i a^4 \cot (c+d x)}{d}-\frac {8 a^4 \log (\sin (c+d x))}{d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-8 i a^4 x-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d} \]

[In]

Int[Cot[c + d*x]^7*(a + I*a*Tan[c + d*x])^4,x]

[Out]

(-8*I)*a^4*x - ((8*I)*a^4*Cot[c + d*x])/d - (4*a^4*Cot[c + d*x]^2)/d + (((8*I)/3)*a^4*Cot[c + d*x]^3)/d + (67*
a^4*Cot[c + d*x]^4)/(60*d) - (8*a^4*Log[Sin[c + d*x]])/d - (Cot[c + d*x]^6*(a^2 + I*a^2*Tan[c + d*x])^2)/(6*d)
 - (((7*I)/15)*Cot[c + d*x]^5*(a^4 + I*a^4*Tan[c + d*x]))/d

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3610

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b
*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3612

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c +
b*d)*(x/(a^2 + b^2)), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3634

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(-a^2)*(b*c - a*d)*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(b*c + a*d)*(n + 1))), x]
 + Dist[a/(d*(b*c + a*d)*(n + 1)), Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1)*Simp[b*(b*c*(
m - 2) - a*d*(m - 2*n - 4)) + (a*b*c*(m - 2) + b^2*d*(n + 1) - a^2*d*(m + n - 1))*Tan[e + f*x], x], x], x] /;
FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 1] && Lt
Q[n, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3672

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e
_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(A*b - a*B)*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2
+ b^2))), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[a*A*c + b*B*c + A*b*d - a*B*d - (A*b*
c - a*B*c - a*A*d - b*B*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && LtQ[m, -1] && NeQ[a^2 + b^2, 0]

Rule 3674

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-a^2)*(B*c - A*d)*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x]
)^(n + 1)/(d*f*(b*c + a*d)*(n + 1))), x] - Dist[a/(d*(b*c + a*d)*(n + 1)), Int[(a + b*Tan[e + f*x])^(m - 1)*(c
 + d*Tan[e + f*x])^(n + 1)*Simp[A*b*d*(m - n - 2) - B*(b*c*(m - 1) + a*d*(n + 1)) + (a*A*d*(m + n) - B*(a*c*(m
 - 1) + b*d*(n + 1)))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && E
qQ[a^2 + b^2, 0] && GtQ[m, 1] && LtQ[n, -1]

Rubi steps \begin{align*} \text {integral}& = -\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {1}{6} \int \cot ^6(c+d x) (a+i a \tan (c+d x))^2 \left (-14 i a^2+10 a^2 \tan (c+d x)\right ) \, dx \\ & = -\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\frac {1}{30} \int \cot ^5(c+d x) (a+i a \tan (c+d x)) \left (134 a^3+106 i a^3 \tan (c+d x)\right ) \, dx \\ & = \frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\frac {1}{30} \int \cot ^4(c+d x) \left (240 i a^4-240 a^4 \tan (c+d x)\right ) \, dx \\ & = \frac {8 i a^4 \cot ^3(c+d x)}{3 d}+\frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\frac {1}{30} \int \cot ^3(c+d x) \left (-240 a^4-240 i a^4 \tan (c+d x)\right ) \, dx \\ & = -\frac {4 a^4 \cot ^2(c+d x)}{d}+\frac {8 i a^4 \cot ^3(c+d x)}{3 d}+\frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\frac {1}{30} \int \cot ^2(c+d x) \left (-240 i a^4+240 a^4 \tan (c+d x)\right ) \, dx \\ & = -\frac {8 i a^4 \cot (c+d x)}{d}-\frac {4 a^4 \cot ^2(c+d x)}{d}+\frac {8 i a^4 \cot ^3(c+d x)}{3 d}+\frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\frac {1}{30} \int \cot (c+d x) \left (240 a^4+240 i a^4 \tan (c+d x)\right ) \, dx \\ & = -8 i a^4 x-\frac {8 i a^4 \cot (c+d x)}{d}-\frac {4 a^4 \cot ^2(c+d x)}{d}+\frac {8 i a^4 \cot ^3(c+d x)}{3 d}+\frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d}-\left (8 a^4\right ) \int \cot (c+d x) \, dx \\ & = -8 i a^4 x-\frac {8 i a^4 \cot (c+d x)}{d}-\frac {4 a^4 \cot ^2(c+d x)}{d}+\frac {8 i a^4 \cot ^3(c+d x)}{3 d}+\frac {67 a^4 \cot ^4(c+d x)}{60 d}-\frac {8 a^4 \log (\sin (c+d x))}{d}-\frac {\cot ^6(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{6 d}-\frac {7 i \cot ^5(c+d x) \left (a^4+i a^4 \tan (c+d x)\right )}{15 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.34 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.76 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=a^4 \left (-\frac {8 i \cot (c+d x)}{d}-\frac {4 \cot ^2(c+d x)}{d}+\frac {8 i \cot ^3(c+d x)}{3 d}+\frac {7 \cot ^4(c+d x)}{4 d}-\frac {4 i \cot ^5(c+d x)}{5 d}-\frac {\cot ^6(c+d x)}{6 d}-\frac {8 \log (\tan (c+d x))}{d}+\frac {8 \log (i+\tan (c+d x))}{d}\right ) \]

[In]

Integrate[Cot[c + d*x]^7*(a + I*a*Tan[c + d*x])^4,x]

[Out]

a^4*(((-8*I)*Cot[c + d*x])/d - (4*Cot[c + d*x]^2)/d + (((8*I)/3)*Cot[c + d*x]^3)/d + (7*Cot[c + d*x]^4)/(4*d)
- (((4*I)/5)*Cot[c + d*x]^5)/d - Cot[c + d*x]^6/(6*d) - (8*Log[Tan[c + d*x]])/d + (8*Log[I + Tan[c + d*x]])/d)

Maple [A] (verified)

Time = 0.41 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.58

method result size
parallelrisch \(-\frac {8 a^{4} \left (\frac {i \left (\cot ^{5}\left (d x +c \right )\right )}{10}+\frac {\left (\cot ^{6}\left (d x +c \right )\right )}{48}-\frac {i \left (\cot ^{3}\left (d x +c \right )\right )}{3}-\frac {7 \left (\cot ^{4}\left (d x +c \right )\right )}{32}+i d x +i \cot \left (d x +c \right )+\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\tan \left (d x +c \right )\right )-\frac {\ln \left (\sec ^{2}\left (d x +c \right )\right )}{2}\right )}{d}\) \(94\)
derivativedivides \(\frac {a^{4} \left (-8 i \cot \left (d x +c \right )-\frac {\left (\cot ^{6}\left (d x +c \right )\right )}{6}-\frac {4 i \left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {7 \left (\cot ^{4}\left (d x +c \right )\right )}{4}+\frac {8 i \left (\cot ^{3}\left (d x +c \right )\right )}{3}-4 \left (\cot ^{2}\left (d x +c \right )\right )+4 \ln \left (\cot ^{2}\left (d x +c \right )+1\right )+8 i \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (d x +c \right )\right )\right )\right )}{d}\) \(99\)
default \(\frac {a^{4} \left (-8 i \cot \left (d x +c \right )-\frac {\left (\cot ^{6}\left (d x +c \right )\right )}{6}-\frac {4 i \left (\cot ^{5}\left (d x +c \right )\right )}{5}+\frac {7 \left (\cot ^{4}\left (d x +c \right )\right )}{4}+\frac {8 i \left (\cot ^{3}\left (d x +c \right )\right )}{3}-4 \left (\cot ^{2}\left (d x +c \right )\right )+4 \ln \left (\cot ^{2}\left (d x +c \right )+1\right )+8 i \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (d x +c \right )\right )\right )\right )}{d}\) \(99\)
risch \(\frac {16 i a^{4} c}{d}+\frac {4 a^{4} \left (270 \,{\mathrm e}^{10 i \left (d x +c \right )}-855 \,{\mathrm e}^{8 i \left (d x +c \right )}+1350 \,{\mathrm e}^{6 i \left (d x +c \right )}-1125 \,{\mathrm e}^{4 i \left (d x +c \right )}+486 \,{\mathrm e}^{2 i \left (d x +c \right )}-86\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{6}}-\frac {8 a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) \(110\)
norman \(\frac {-\frac {a^{4}}{6 d}+\frac {7 a^{4} \left (\tan ^{2}\left (d x +c \right )\right )}{4 d}-\frac {4 a^{4} \left (\tan ^{4}\left (d x +c \right )\right )}{d}-\frac {4 i a^{4} \tan \left (d x +c \right )}{5 d}+\frac {8 i a^{4} \left (\tan ^{3}\left (d x +c \right )\right )}{3 d}-\frac {8 i a^{4} \left (\tan ^{5}\left (d x +c \right )\right )}{d}-8 i a^{4} x \left (\tan ^{6}\left (d x +c \right )\right )}{\tan \left (d x +c \right )^{6}}-\frac {8 a^{4} \ln \left (\tan \left (d x +c \right )\right )}{d}+\frac {4 a^{4} \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}\) \(150\)

[In]

int(cot(d*x+c)^7*(a+I*a*tan(d*x+c))^4,x,method=_RETURNVERBOSE)

[Out]

-8*a^4*(1/10*I*cot(d*x+c)^5+1/48*cot(d*x+c)^6-1/3*I*cot(d*x+c)^3-7/32*cot(d*x+c)^4+I*d*x+I*cot(d*x+c)+1/2*cot(
d*x+c)^2+ln(tan(d*x+c))-1/2*ln(sec(d*x+c)^2))/d

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 254, normalized size of antiderivative = 1.57 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=\frac {4 \, {\left (270 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} - 855 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} + 1350 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} - 1125 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 486 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} - 86 \, a^{4} - 30 \, {\left (a^{4} e^{\left (12 i \, d x + 12 i \, c\right )} - 6 \, a^{4} e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} - 20 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} - 6 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )\right )}}{15 \, {\left (d e^{\left (12 i \, d x + 12 i \, c\right )} - 6 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 15 \, d e^{\left (8 i \, d x + 8 i \, c\right )} - 20 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 15 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 6 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]

[In]

integrate(cot(d*x+c)^7*(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

4/15*(270*a^4*e^(10*I*d*x + 10*I*c) - 855*a^4*e^(8*I*d*x + 8*I*c) + 1350*a^4*e^(6*I*d*x + 6*I*c) - 1125*a^4*e^
(4*I*d*x + 4*I*c) + 486*a^4*e^(2*I*d*x + 2*I*c) - 86*a^4 - 30*(a^4*e^(12*I*d*x + 12*I*c) - 6*a^4*e^(10*I*d*x +
 10*I*c) + 15*a^4*e^(8*I*d*x + 8*I*c) - 20*a^4*e^(6*I*d*x + 6*I*c) + 15*a^4*e^(4*I*d*x + 4*I*c) - 6*a^4*e^(2*I
*d*x + 2*I*c) + a^4)*log(e^(2*I*d*x + 2*I*c) - 1))/(d*e^(12*I*d*x + 12*I*c) - 6*d*e^(10*I*d*x + 10*I*c) + 15*d
*e^(8*I*d*x + 8*I*c) - 20*d*e^(6*I*d*x + 6*I*c) + 15*d*e^(4*I*d*x + 4*I*c) - 6*d*e^(2*I*d*x + 2*I*c) + d)

Sympy [A] (verification not implemented)

Time = 4.27 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.52 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=- \frac {8 a^{4} \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac {1080 a^{4} e^{10 i c} e^{10 i d x} - 3420 a^{4} e^{8 i c} e^{8 i d x} + 5400 a^{4} e^{6 i c} e^{6 i d x} - 4500 a^{4} e^{4 i c} e^{4 i d x} + 1944 a^{4} e^{2 i c} e^{2 i d x} - 344 a^{4}}{15 d e^{12 i c} e^{12 i d x} - 90 d e^{10 i c} e^{10 i d x} + 225 d e^{8 i c} e^{8 i d x} - 300 d e^{6 i c} e^{6 i d x} + 225 d e^{4 i c} e^{4 i d x} - 90 d e^{2 i c} e^{2 i d x} + 15 d} \]

[In]

integrate(cot(d*x+c)**7*(a+I*a*tan(d*x+c))**4,x)

[Out]

-8*a**4*log(exp(2*I*d*x) - exp(-2*I*c))/d + (1080*a**4*exp(10*I*c)*exp(10*I*d*x) - 3420*a**4*exp(8*I*c)*exp(8*
I*d*x) + 5400*a**4*exp(6*I*c)*exp(6*I*d*x) - 4500*a**4*exp(4*I*c)*exp(4*I*d*x) + 1944*a**4*exp(2*I*c)*exp(2*I*
d*x) - 344*a**4)/(15*d*exp(12*I*c)*exp(12*I*d*x) - 90*d*exp(10*I*c)*exp(10*I*d*x) + 225*d*exp(8*I*c)*exp(8*I*d
*x) - 300*d*exp(6*I*c)*exp(6*I*d*x) + 225*d*exp(4*I*c)*exp(4*I*d*x) - 90*d*exp(2*I*c)*exp(2*I*d*x) + 15*d)

Maxima [A] (verification not implemented)

none

Time = 0.59 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.76 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {480 i \, {\left (d x + c\right )} a^{4} - 240 \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 480 \, a^{4} \log \left (\tan \left (d x + c\right )\right ) - \frac {-480 i \, a^{4} \tan \left (d x + c\right )^{5} - 240 \, a^{4} \tan \left (d x + c\right )^{4} + 160 i \, a^{4} \tan \left (d x + c\right )^{3} + 105 \, a^{4} \tan \left (d x + c\right )^{2} - 48 i \, a^{4} \tan \left (d x + c\right ) - 10 \, a^{4}}{\tan \left (d x + c\right )^{6}}}{60 \, d} \]

[In]

integrate(cot(d*x+c)^7*(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

-1/60*(480*I*(d*x + c)*a^4 - 240*a^4*log(tan(d*x + c)^2 + 1) + 480*a^4*log(tan(d*x + c)) - (-480*I*a^4*tan(d*x
 + c)^5 - 240*a^4*tan(d*x + c)^4 + 160*I*a^4*tan(d*x + c)^3 + 105*a^4*tan(d*x + c)^2 - 48*I*a^4*tan(d*x + c) -
 10*a^4)/tan(d*x + c)^6)/d

Giac [A] (verification not implemented)

none

Time = 0.86 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.51 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {5 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 48 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 240 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 880 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2835 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 30720 \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right ) + 15360 \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) - 10080 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {37632 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 10080 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2835 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 880 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 240 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 48 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5 \, a^{4}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \]

[In]

integrate(cot(d*x+c)^7*(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

-1/1920*(5*a^4*tan(1/2*d*x + 1/2*c)^6 - 48*I*a^4*tan(1/2*d*x + 1/2*c)^5 - 240*a^4*tan(1/2*d*x + 1/2*c)^4 + 880
*I*a^4*tan(1/2*d*x + 1/2*c)^3 + 2835*a^4*tan(1/2*d*x + 1/2*c)^2 - 30720*a^4*log(tan(1/2*d*x + 1/2*c) + I) + 15
360*a^4*log(tan(1/2*d*x + 1/2*c)) - 10080*I*a^4*tan(1/2*d*x + 1/2*c) - (37632*a^4*tan(1/2*d*x + 1/2*c)^6 - 100
80*I*a^4*tan(1/2*d*x + 1/2*c)^5 - 2835*a^4*tan(1/2*d*x + 1/2*c)^4 + 880*I*a^4*tan(1/2*d*x + 1/2*c)^3 + 240*a^4
*tan(1/2*d*x + 1/2*c)^2 - 48*I*a^4*tan(1/2*d*x + 1/2*c) - 5*a^4)/tan(1/2*d*x + 1/2*c)^6)/d

Mupad [B] (verification not implemented)

Time = 5.33 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.66 \[ \int \cot ^7(c+d x) (a+i a \tan (c+d x))^4 \, dx=-\frac {a^4\,\mathrm {atan}\left (2\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,16{}\mathrm {i}}{d}-\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^5\,8{}\mathrm {i}+4\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^4-\frac {a^4\,{\mathrm {tan}\left (c+d\,x\right )}^3\,8{}\mathrm {i}}{3}-\frac {7\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^2}{4}+\frac {a^4\,\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}}{5}+\frac {a^4}{6}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^6} \]

[In]

int(cot(c + d*x)^7*(a + a*tan(c + d*x)*1i)^4,x)

[Out]

- (a^4*atan(2*tan(c + d*x) + 1i)*16i)/d - ((a^4*tan(c + d*x)*4i)/5 + a^4/6 - (7*a^4*tan(c + d*x)^2)/4 - (a^4*t
an(c + d*x)^3*8i)/3 + 4*a^4*tan(c + d*x)^4 + a^4*tan(c + d*x)^5*8i)/(d*tan(c + d*x)^6)